<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let fn1 = (a = 10, b = '默认值') => {
            console.log(a)
            console.log(b)
        }

        /*   fn1(undefined, undefined)
          fn1(null, null) */

        let fn2 = (a = '默认值a', b = '默认值b', c = 10) => {
            console.log(a)
            console.log(b)
            console.log(c)
        }
        fn2(1, undefined, null)
        // 1 默认值b null




        /*  let fn3 = (a = 5, b = 10, c = 20) => {
             console.log(a + b + c)
         }

         fn3(null, true, false) // 1+0
         fn3(1, null, null) // 1 */
    </script>
</body>

</html>